using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using CMS.Core.DataInterfaces;
using CMS.Presenters;
using CMS.Data;
using CMS.Core.Domain;

namespace CMS.Web
{
    public partial class Site : BaseMasterPage, IMenuView
    {
        //public int _FunctionId = 0;
        //MenuPresenter presenter;
        //IChucNangDao iChucNangDao;
        //public IList menu;
        //public IList<ChucNang> functions;
        public NguoiSuDungInfo userInfo = null;
        //public string fName = null;
        //public string action = null;
        //public string displayLeftMenu = "";

        //public string resWidth = "1024";
        //public string TableWidth = "1004";
        //public int iTableWidth = 1004;
        //public bool bEx = true;
        //public string GetDocSendByNetworkTime = "";
        
        protected void Page_Load(object sender, EventArgs e)
        {
            //AjaxPro.Utility.RegisterTypeForAjax(typeof(CMS.Web.Ultil4WS));
            //this.GetDocSendByNetworkTime = CauHinhHeThong.GetDocSendByNetworkTime;

            //this.frmMain.DefaultButton = btnDefault.UniqueID;      
      
            //fName = Request.QueryString.Get("fName");
            //if (fName != null) fName = fName.ToUpper();
            //action = Request.QueryString.Get("action");
            //if (action != null) action = action.ToUpper();

            //iChucNangDao = NHibernateDaoFactory.Instance.GetChucNangDao();
            //this.presenter = new MenuPresenter(this, iChucNangDao);

            userInfo = (NguoiSuDungInfo)Session["UserInfo"];
            //if (userInfo == null)
            //{
            //    FormsAuthentication.SignOut();
            //    Response.Redirect(FormsAuthentication.LoginUrl);
            //}
        }

        protected void btnLogout_Click(object sender, ImageClickEventArgs e)
        {
            Response.Redirect("LogOut.aspx");
        }
    }
}
